package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PaperCheckPassMapper;
import com.ruoyi.system.domain.PaperCheckPass;
import com.ruoyi.system.service.IPaperCheckPassService;
import com.ruoyi.common.core.text.Convert;

/**
 * checkpass论文Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class PaperCheckPassServiceImpl implements IPaperCheckPassService 
{
    @Autowired
    private PaperCheckPassMapper paperCheckPassMapper;

    /**
     * 查询checkpass论文
     * 
     * @param id checkpass论文主键
     * @return checkpass论文
     */
    @Override
    public PaperCheckPass selectPaperCheckPassById(Long id)
    {
        return paperCheckPassMapper.selectPaperCheckPassById(id);
    }

    /**
     * 查询checkpass论文列表
     * 
     * @param paperCheckPass checkpass论文
     * @return checkpass论文
     */
    @Override
    public List<PaperCheckPass> selectPaperCheckPassList(PaperCheckPass paperCheckPass)
    {
        return paperCheckPassMapper.selectPaperCheckPassList(paperCheckPass);
    }

    @Override
    public List<PaperCheckPass> selectWaitCheckList() {
        return paperCheckPassMapper.selectWaitCheckList();
    }

    /**
     * 新增checkpass论文
     * 
     * @param paperCheckPass checkpass论文
     * @return 结果
     */
    @Override
    public int insertPaperCheckPass(PaperCheckPass paperCheckPass)
    {
//        paperCheckPass.setCreateTime(DateUtils.getNowDate());
        return paperCheckPassMapper.insertPaperCheckPass(paperCheckPass);
    }

    /**
     * 修改checkpass论文
     * 
     * @param paperCheckPass checkpass论文
     * @return 结果
     */
    @Override
    public boolean updatePaperCheckPass(PaperCheckPass paperCheckPass)
    {
        return paperCheckPassMapper.updatePaperCheckPass(paperCheckPass)>0;
    }

    /**
     * 批量删除checkpass论文
     * 
     * @param ids 需要删除的checkpass论文主键
     * @return 结果
     */
    @Override
    public int deletePaperCheckPassByIds(String ids)
    {
        return paperCheckPassMapper.deletePaperCheckPassByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除checkpass论文信息
     * 
     * @param id checkpass论文主键
     * @return 结果
     */
    @Override
    public int deletePaperCheckPassById(Long id)
    {
        return paperCheckPassMapper.deletePaperCheckPassById(id);
    }
}
